#ifndef SATURNOS_INC_POOL_H
#define SATURNOS_INC_POOL_H
struct link_t {
	struct link_t* next;
};

struct pool_t {
	struct link_t* first;
	int link_offset;
};

struct queue_t {
	struct link_t* first;
	struct link_t* last;
	int link_offset;
};

void pool_init(struct pool_t* pool, int link_offset);
void pool_add(struct pool_t* pool, void*);
void* pool_pop(struct pool_t* pool);

void queue_init(struct queue_t* q, int link_offset);
void queue_enqueue(struct queue_t* q, void*);
void* queue_dequeue(struct queue_t* q);
#endif /* SATURNOS_INC_POOL_H */

